package com.hyt.it.ogt.ksmonitor.statistics.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hyt.it.ogt.ksmonitor.statistics.model.entity.KwMonitorStatistics;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 朱振宇
 * @since 2022-12-15
 */
public interface MonitorStatisticsMapper extends BaseMapper<KwMonitorStatistics> {

    int updateStatisticsTotal(@Param("id") String id, @Param("num") long num, @Param("updateDate") LocalDateTime updateDate);

    int updateStatisticsTotalByVerify(@Param("id") String id, @Param("sourceNum") long sourceNum, @Param("targetNum") long targetNum, @Param("updateDate") LocalDateTime updateDate);

    List<KwMonitorStatistics> findMonitorStatisticsList(@Param("examId") String examId);

    List<KwMonitorStatistics> findMonitorStatisticsListWithNullRoomId(@Param("examId") String examId);

    List<KwMonitorStatistics> findMonitorStatisticsListByRoomIds(@Param("examId") String examId, @Param("roomIds") List<String> roomIds);

    List<KwMonitorStatistics> findMonitorStatisticsListBetweenDate(@Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate);

    Integer getCandidateTotalByExamId(@Param("examId") String examId);
}
